home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / AIncludes / LanguageAnalysis.a < prev    next >
Text File  |  1996-05-01  |  7KB  |  270 lines

  1. ;
  2. ;    File:        LanguageAnalysis.a
  3. ;
  4. ;    Contains:    Language Analysis Manager Interfaces
  5. ;
  6. ;    Version:    Technology:    System 8
  7. ;                Release:    Universal Interfaces 3.0d3 on Copland DR1
  8. ;
  9. ;    Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10. ;
  11. ;    Bugs?:        If you find a problem with this file, send the file and version
  12. ;                information (from above) and the problem description to:
  13. ;
  14. ;                    Internet:    apple.bugs@applelink.apple.com
  15. ;                    AppleLink:    APPLE.BUGS
  16. ;
  17. ;
  18.     IF &TYPE('__LANGUAGEANALYSIS__') = 'UNDEFINED' THEN
  19. __LANGUAGEANALYSIS__ SET 1
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24.     IF &TYPE('__AEDATAMODEL__') = 'UNDEFINED' THEN
  25.     include 'AEDataModel.a'
  26.     ENDIF
  27.     IF &TYPE('__AEREGISTRY__') = 'UNDEFINED' THEN
  28.     include 'AERegistry.a'
  29.     ENDIF
  30.     IF &TYPE('__FILEMANAGERTYPES__') = 'UNDEFINED' THEN
  31.     include 'FileManagerTypes.a'
  32.     ENDIF
  33.     IF &TYPE('__LOCALEOBJECTS__') = 'UNDEFINED' THEN
  34.     include 'LocaleObjects.a'
  35.     ENDIF
  36.     IF &TYPE('__DICTIONARY__') = 'UNDEFINED' THEN
  37.     include 'Dictionary.a'
  38.     ENDIF
  39.     IF FOR_SYSTEM8_PREEMPTIVE THEN
  40.     IF FOR_PTR_BASED_AE THEN
  41. ; typedef UInt32                         LAItemOffset
  42.  
  43. ; typedef LocaleObjectRef                 LAEnvironmentLocaleObjectRef
  44.  
  45.  
  46.  
  47. ; typedef AEKeyword                     LAPropertyKey
  48.  
  49. ; typedef DescType                         LAPropertyType
  50.  
  51. ;
  52. ;    Names for Environment Locale Object Attribute Names and Values
  53. ;
  54. ;  Japanese Kana-Kanji conversion
  55. ;  Japanese TTS
  56. ;  General Morpheme Analysis
  57. ;
  58. ;    Tags for Environment Properties
  59. ;
  60.  
  61. keyAELAAutoLearning                EQU        'laal'                ; Boolean
  62. keyAELALearningDictionary        EQU        'lald'                ; Some permanent file specification
  63. keyAELADictionaryList            EQU        'ladc'                ; AEList which has a list of dictionary informaion.
  64. ;
  65. ;    Tags for dictionary information
  66. ;
  67.  
  68. keyAELADictionaryFile            EQU        'dfil'                ; Some permanent file specification
  69. keyAELADictionaryWeight            EQU        'dwgt'                ; Int32
  70. keyAELADictionaryID                EQU        'did '                ; DictionaryID (r/o, volatile)
  71. LAMorphemeBundle        RECORD 0
  72. f                         ds        AERecord
  73. sizeof                     EQU *                    ; size:   $8 (8)
  74.                         ENDR
  75.  
  76.  
  77. LAMorphemePath            RECORD 0
  78. f                         ds        AERecord
  79. sizeof                     EQU *                    ; size:   $8 (8)
  80.                         ENDR
  81.  
  82.  
  83. LAMorpheme                RECORD 0
  84. f                         ds        AERecord
  85. sizeof                     EQU *                    ; size:   $8 (8)
  86.                         ENDR
  87.  
  88.  
  89. LAHomograph                RECORD 0
  90. f                         ds        AERecord
  91. sizeof                     EQU *                    ; size:   $8 (8)
  92.                         ENDR
  93.  
  94.  
  95.  
  96. typeLAMorphemeBundle            EQU        'lmfb'
  97. typeLAMorphemePath                EQU        'lmfp'
  98. typeLAMorpheme                    EQU        'lmfn'
  99. typeLAHomograph                    EQU        'lmfh'
  100.  
  101. keyAELAMorphemeBundle            EQU        'lmfb'
  102. keyAELAMorphemePath                EQU        'lmfp'
  103. keyAELAMorpheme                    EQU        'lmfn'
  104. keyAELAHomograph                EQU        'lmfh'
  105.  
  106. kLADefaultEdge                    EQU        0
  107. kLAFreeEdge                        EQU        1
  108. kLAIncompleteEdge                EQU        2
  109.  
  110. kAllMorphemes                    EQU        -1
  111.  
  112. kNoContext                        EQU        0
  113. ; typedef OptionBits                     LAFeedbackType
  114.  
  115.  
  116. kLAAcceptedAsIs                    EQU        0
  117. kLAHomophoneSelected            EQU        $01
  118. kLALocalReanalysis                EQU        $02
  119. kLATransLiterate                EQU        $04
  120. ;
  121. ;    Error Value
  122. ;
  123.  
  124. laEngineNotFoundErr                EQU        -7000                ; can't find the engine
  125. laPropertyErr                    EQU        -7001                ; Error in properties
  126. laPropertyNotFoundErr            EQU        -7002                ; can't find the property
  127. laPropertyIsReadOnlyErr            EQU        -7003                ; the property is read only
  128. laPropertyUnknownErr            EQU        -7004                ; the property is unknown to this environment
  129. laPropertyValueErr                EQU        -7005                ; Invalid property value
  130. laDictionaryTooManyErr            EQU        -7006                ; too many dictionaries
  131. laDictionaryUnknownErr            EQU        -7007                ; can't use this dictionary with this environment
  132. laDictionaryNotOpenedErr        EQU        -7008                ; the dictionary is not opened
  133. laTextOverFlowErr                EQU        -7009                ; text is too long
  134. laFailAnalysisErr                EQU        -7010                ; analysis failed
  135. laNoMoreMorphemeErr                EQU        -7011                ; nothing to read
  136. ;
  137. ;    Handling Context
  138. ;
  139. ;
  140. ; extern OSStatus LAOpenContext(LAEnvironmentLocaleObjectRef environ, LAContextRef *context, OSStatus *specificErr, AERecord *which)
  141. ;
  142.     IF GENERATINGCFM THEN
  143.         IMPORT_CFM_FUNCTION LAOpenContext
  144.     ENDIF
  145.  
  146. ;
  147. ; extern OSStatus LACloseContext(LAContextRef context)
  148. ;
  149.     IF GENERATINGCFM THEN
  150.         IMPORT_CFM_FUNCTION LACloseContext
  151.     ENDIF
  152.  
  153. ;
  154. ;    Handling Environment
  155. ;
  156. ;
  157. ; extern OSStatus LAGetEnvironmentProperty(LAEnvironmentLocaleObjectRef environment, LAPropertyKey propertyKey, LAPropertyType desiredType, ByteCount maxSize, LAPropertyType *actualType, ByteCount *actualSize, LogicalAddress value)
  158. ;
  159.     IF GENERATINGCFM THEN
  160.         IMPORT_CFM_FUNCTION LAGetEnvironmentProperty
  161.     ENDIF
  162.  
  163. ;
  164. ; extern OSStatus LASetEnvironmentProperty(LAEnvironmentLocaleObjectRef environment, LAPropertyKey propertyKey, LAPropertyType propertyType, ByteCount valueSize, ConstLogicalAddress value, OSStatus *specificErr)
  165. ;
  166.     IF GENERATINGCFM THEN
  167.         IMPORT_CFM_FUNCTION LASetEnvironmentProperty
  168.     ENDIF
  169.  
  170. ;
  171. ;    Handling dictionries
  172. ;
  173. ;
  174. ; extern OSStatus LAOpenDictionary(LAEnvironmentLocaleObjectRef environ, DCMDictionaryID dictionaryID, AERecord *dictionaryProperty)
  175. ;
  176.     IF GENERATINGCFM THEN
  177.         IMPORT_CFM_FUNCTION LAOpenDictionary
  178.     ENDIF
  179.  
  180. ;
  181. ; extern OSStatus LACloseDictionary(LAEnvironmentLocaleObjectRef environ, DCMDictionaryID dictionary)
  182. ;
  183.     IF GENERATINGCFM THEN
  184.         IMPORT_CFM_FUNCTION LACloseDictionary
  185.     ENDIF
  186.  
  187. ;
  188. ; extern OSStatus LAListAvailableDictionary(LAEnvironmentLocaleObjectRef environ, ItemCount maxCount, ItemCount *actualCount, DCMDictionaryID dictionaryList[2147483647])
  189. ;
  190.     IF GENERATINGCFM THEN
  191.         IMPORT_CFM_FUNCTION LAListAvailableDictionary
  192.     ENDIF
  193.  
  194. ;
  195. ;    Analyzing text
  196. ;
  197. ;
  198. ; extern OSStatus LAMorphemeAnalysis(LAContextRef context, ConstTextObject text, LAMorphemePath *leadingPath, LAMorphemePath *trailingPath, ItemCount pathCount, LAMorphemeBundle *result)
  199. ;
  200.     IF GENERATINGCFM THEN
  201.         IMPORT_CFM_FUNCTION LAMorphemeAnalysis
  202.     ENDIF
  203.  
  204. ;
  205. ; extern OSStatus LAContinuousMorphemeAnalysis(LAContextRef context, ConstTextObject text, Boolean incrementalText, LAMorphemePath *leadingPath, LAMorphemePath *trailingPath, Boolean *modified)
  206. ;
  207.     IF GENERATINGCFM THEN
  208.         IMPORT_CFM_FUNCTION LAContinuousMorphemeAnalysis
  209.     ENDIF
  210.  
  211. ;
  212. ; extern OSStatus LAGetMorphemes(LAContextRef context, LAMorphemePath *result)
  213. ;
  214.     IF GENERATINGCFM THEN
  215.         IMPORT_CFM_FUNCTION LAGetMorphemes
  216.     ENDIF
  217.  
  218. ;
  219. ; extern OSStatus LAShiftMorphemes(LAContextRef context, ItemCount morphemeCount, LAMorphemePath *path, ByteCount *byteCount)
  220. ;
  221.     IF GENERATINGCFM THEN
  222.         IMPORT_CFM_FUNCTION LAShiftMorphemes
  223.     ENDIF
  224.  
  225. ;
  226. ; extern OSStatus LAResetAnalysis(LAContextRef context)
  227. ;
  228.     IF GENERATINGCFM THEN
  229.         IMPORT_CFM_FUNCTION LAResetAnalysis
  230.     ENDIF
  231.  
  232. ;
  233. ; extern OSStatus LAGetAllHomographs(LAContextRef context, const LAMorphemePath *path, LAItemOffset morphemeOffset, LAMorpheme *morpheme)
  234. ;
  235.     IF GENERATINGCFM THEN
  236.         IMPORT_CFM_FUNCTION LAGetAllHomographs
  237.     ENDIF
  238.  
  239. ;
  240. ; extern OSStatus LAGetRootForm(LAContextRef context, const LAMorphemePath *path, LAItemOffset morphemeOffset, LAMorphemePath *rootForm)
  241. ;
  242.     IF GENERATINGCFM THEN
  243.         IMPORT_CFM_FUNCTION LAGetRootForm
  244.     ENDIF
  245.  
  246. ;
  247. ;    Learning
  248. ;
  249. ;
  250. ; extern OSStatus LAFeedbackPath(LAContextRef context, LAMorphemePath path, LAItemOffset startingPosition, ItemCount morphemeCount, LAFeedbackType *feedbackType, Boolean confirmed)
  251. ;
  252.     IF GENERATINGCFM THEN
  253.         IMPORT_CFM_FUNCTION LAFeedbackPath
  254.     ENDIF
  255.  
  256. ;
  257. ;    TextObject interface
  258. ;
  259. ;
  260. ; extern OSStatus LAAnnotateTextObjectWithMorpheme(ConstStr255Param analysisClass, ItemCount tagCount, DCMFieldTag *tags, TextObject text)
  261. ;
  262.     IF GENERATINGCFM THEN
  263.         IMPORT_CFM_FUNCTION LAAnnotateTextObjectWithMorpheme
  264.     ENDIF
  265.  
  266.     ENDIF
  267.     ENDIF
  268.     ENDIF ; __LANGUAGEANALYSIS__ 
  269.  
  270.